class SomeBaseClass {
  // ...
}

class Foo<T extends SomeBaseClass> {
  String toString() => "Instance of 'Foo<$T>'";
}

class AnotherClass {
  // ...
}

// 子类
class Extender extends SomeBaseClass {
  // ...
}

void main(List<String> args) {
  Foo someBaseClass = Foo<SomeBaseClass>();
  print(someBaseClass);

  // var f = Foo<AnotherClass>();

  Foo extenderFoo = Foo<Extender>();
  print(extenderFoo);

  Foo f = Foo();
  print(f);
}
